<template>
  <div>
    <h1>Movie</h1>
    <h2>count--{{count}}</h2>
    <button @click="getMovieList">点击获取电影名称</button>
    <ul>
      <li v-for="(item,index) in movieList" :key="item.tvId">
        {{index + 1}}-{{item.name}}
      </li>
    </ul>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";
export default defineComponent({
    name:"Movie",
})
</script>

<script lang="ts" setup>
import {storeToRefs} from "pinia";
import {useMovieStore} from "../store/movie/movie";
import {useCountStore} from "../store/count/count";
const countStore = useCountStore()
const movieStore = useMovieStore()
const {count} = storeToRefs(countStore)
const {movieList} = storeToRefs(movieStore)
const {getMovieList} = movieStore
console.log(movieList)
</script>

<style scoped>
h1{
    background: skyblue;
}
ul{
    padding: 0px;
}
li{
    list-style: none;
    background: yellowgreen;
}
</style>